<?php 
// Funcao LOGIN Criado por Gstv.Inc
	//joga pra fora se vc nao tiver logado Gstv.inc Producoes
	session_start(); 
	if(!isset($_SESSION['userEmailSession']) AND !isset($_SESSION['userPasswordSession'])){
		session_destroy();
//		header("Location: ../index.php");
		exit;
//se nao tiver ninguem logado destroy tudo e redireciona
	}
?>
<?php 
//FUNCAO CHECA A PAGINA Q TA
$page = basename($_SERVER['SCRIPT_NAME']); 
?>

<?php 
// FUNCAO DA LINGUAGEM riado or Gstv.Inc.
if (!isset($_GET['lang'])and (!isset($_SESSION['set_lang']))) {
	// se nao tiver nenhuma o default e english
	
	$_SESSION['set_lang'] = "eng-US";	
}elseif (isset($_GET['lang'])and (isset($_SESSION['set_lang']))) {
	
	// se ja tiver a sessao desativa a velha e coloca o novo valor q vem pelo GET
	unset($_SESSION['set_lang']);
	// recolocando o valor
	$_SESSION['set_lang'] = $_GET['lang'];
	
}elseif (isset($_GET['re_set_lang']) and (!isset($_SESSION['set_lang']))){
	
	//se for destruida no logout  vai vir pelo GET home.php?re_set_lang=eng-US
	$_SESSION['set_lang'] = $_GET['re_set_lang'];
}
//testando
$variavel_lang = $_SESSION['set_lang'];
//echo $variavel_lang."<br />";

//sistema de cookie funcionando abaixo
//melhor q usar segundos
//acredito ser 60seg 60min 24horas 30dias 
//In the example above the expiration time is set to a month (60 sec * 60 min * 24 hours * 30 days).
//$expire = time()+60*60*24*1;

//setcookie("cookie", "cookieVALOR2", $expire, "/" );
//echo $_COOKIE["cookie"]. "!<<<<<<<============= AQUI<br />";
//unset($_COOKIE['translate']);
//isso ve todos os cookies
//print_r($_COOKIE);
//isso ve todas as sessoes
//print_r($_SESSION);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Gstv.Inc &copy;&reg;| Admin.</title>

<?php 
// aqui redireciona para a linguagen
	//include_once "lang/".$_SESSION['set_lang']."/home.php";?>
<link rel="stylesheet" href="css/main.css" type="text/css" />
<!-- SLIDE -->
<link rel="stylesheet" type="text/css" href="imagens/slide/css/style1.css" />
<title>Gstv.Inc &copy;&reg;| Admin.</title>
</head>
<body>


	<div id="wrapper"><!-- wrapper -->
				<?php //include 'includes/header.php';?>
				<?php //include 'includes/navBar.php';?>
				
				<div id="top"><!-- barra PRINCIPAL -->
					<div id="top_bar">	
						<ul>
							<li><a href="">Home</a></li>
							<li><a href="">Config</a></li>
							<li><a href="">Link</a></li>
							<li><a href="">Link</a></li>
							<li><a href="">Link</a></li>
							<li><a href="">Link</a></li>
							<li><a href="">Link</a></li>
						</ul>
					</div><!-- "top_bar" -->
					
					<div id="top_menu">	
						<ul>
							
							<li><a href="">Config</a></li>
							<li><a href="">Logout</a></li>
							
						</ul>
					</div><!-- "top_menu" -->
				</div><!-- "top" -->	
					
					
				<div id="header">
					<div id="header_logo"><a href=""><img src="../imagens/128px.png" alt="logo"></img></a></div>
				</div>	
					
				
			
				
				
				
				
				<div id="sidebar"><!-- o menu da esquerda COLUNA -->
					
					<div class="sidebar_btn"><a href="">sidebar</a></div>
					<div class="sidebar_active"><a href="">sidebar</a></div>	
					<div class="sidebar_btn"><a href="">sidebar</a></div>	
					<div class="sidebar_btn"><a href="">sidebar</a></div>	
					<div class="sidebar_btn"><a href="">sidebar</a></div>	
					<div class="sidebar_btn"><a href="">sidebar</a></div>	
					<div class="sidebar_btn"><a href="">sidebar</a></div>	
					<div class="sidebar_btn"><a href="">sidebar</a></div>	
			
				</div>
				
				<div id="body_right">
						<div id="toolbar"><!-- o menu da direita -->
								<div class="toolbar_menu"><a href="">toolbar_menu</a></div>
								<div class="toolbar_menu"><a href="">toolbar_menu</a></div>
								<div class="toolbar_menu"><a href="">toolbar_menu</a></div>
								<div class="toolbar_menu"><a href="">toolbar_menu</a></div>
								<div class="toolbar_menu"><a href="">toolbar_menu</a></div>
						</div>
				
					<div class="row">row</div>
					<div class="row">row</div>
					<div class="row">row</div>
					<div class="row">row</div>
					<div class="row">row</div>
					<div class="row">row</div>
					<div class="row">row</div>
					<div class="row">row</div>
					<div class="row">row</div>
					<div class="row">row</div>
					<div class="row">row</div>
					<div class="row">row</div>
					<div class="row">row</div>
					<div class="row">row</div>
				</div>
		
		
		
		
		
				<div id="footer_main">footer_main
					<div id="copy_rights">
						Powered by <a href="#"  title="Bramin e um Admin criado para ser usado em sites PhP [Criado por Gstv.Inc]">Bramin</a> 2010 | 2011,[version RC-0.05]<br />
						 <a href="mailto:gstv.inc@gmail.com?subject=Comments&body=Tanks" title="Fell Free to email me  ;)">Gstv.Inc&trade;</a> &copy;&reg;&nbsp; All rights reserved.
					<!-- <a href="javascript:window.external.AddFavorite('http://', '')">Bookmark Site</a> -->	
					</div>	 
				</div>		
					
				
				
		
		
		
	</div><!-- wrapper -->
	<?php //include 'includes/footer.php';?>
</body>
</html>
